package hcn.protocol.ods.ehc;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

/**
 * 注册电子健康卡响应参数
 * Created by yanglj on 2019/3/1.
 */
@XmlRootElement(name = "registerResponse")
public class RegisterResponse<T> {
    private String ehealth_card_id;//电子健康卡ID
    private String mindex_id;//居民健康卡主索引ID
    private String health_card_no;//居民健康卡卡号
    private String xman_id;//市民健康系统ID
    private String id_type;//证件类型
    private String id_no;//证件号
    private String name;//用户姓名
    private String card_type;//卡类型
    private String card_no;//就诊卡号
    private List<T> card_list;//绑定卡列表
    private String id_type_text;//证件类型名称

    @XmlElement(name = "ehealth_card_id")
    public String getEhealth_card_id() {
        return ehealth_card_id;
    }

    public void setEhealth_card_id(String ehealth_card_id) {
        this.ehealth_card_id = ehealth_card_id;
    }

    @XmlElement(name = "mindex_id")
    public String getMindex_id() {
        return mindex_id;
    }

    public void setMindex_id(String mindex_id) {
        this.mindex_id = mindex_id;
    }

    @XmlElement(name = "health_card_no")
    public String getHealth_card_no() {
        return health_card_no;
    }

    public void setHealth_card_no(String health_card_no) {
        this.health_card_no = health_card_no;
    }

    @XmlElement(name = "xman_id")
    public String getXman_id() {
        return xman_id;
    }

    public void setXman_id(String xman_id) {
        this.xman_id = xman_id;
    }

    @XmlElement(name = "id_type")
    public String getId_type() {
        return id_type;
    }

    public void setId_type(String id_type) {
        this.id_type = id_type;
    }

    @XmlElement(name = "id_no")
    public String getId_no() {
        return id_no;
    }

    public void setId_no(String id_no) {
        this.id_no = id_no;
    }

    @XmlElement(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @XmlElement(name = "card_type")
    public String getCard_type() {
        return card_type;
    }

    public void setCard_type(String card_type) {
        this.card_type = card_type;
    }

    @XmlElement(name = "card_no")
    public String getCard_no() {
        return card_no;
    }

    public void setCard_no(String card_no) {
        this.card_no = card_no;
    }

    @XmlElement(name = "card_list")
    public List<T> getCard_list() {
        return card_list;
    }

    public void setCard_list(List<T> card_list) {
        this.card_list = card_list;
    }

    public String getId_type_text() {
        switch (this.id_type){
            case "01":id_type_text = "居民身份证";break;
            case "02":id_type_text = "居民户口簿";break;
            case "03":id_type_text = "护照";break;
            case "04":id_type_text = "军官证";break;
            case "05":id_type_text = "驾驶证";break;
            case "06":id_type_text = "港澳居民来往内地通行证";break;
            case "07":id_type_text = "台湾居民来往内地通行证";break;
            case "99":id_type_text = "其他法定有效证件";break;
            default:id_type_text = "";
        }
        return id_type_text;
    }

    public void setId_type_text(String id_type_text) {
        this.id_type_text = id_type_text;
    }
}
